@echo off
cd /d %~dp0

REM docker container stop video-discovery video-discovery2 video-gateway video-gateway2 video-auth video-auth2 video-user video-user2
REM docker container rm video-discovery video-discovery2 video-gateway video-gateway2 video-auth video-auth2 video-user video-user2
REM docker image rm video-discovery:1.0 video-gateway:1.0 video-auth:1.0 video-user:1.0

cd ..
REM start "video-discovery" /wait cmd /c gradlew task video-discovery:clean video-discovery:bootJar
REM start "video-gateway" /wait cmd /c gradlew task video-gateway:clean video-gateway:bootJar
REM start "video-auth" /wait cmd /c gradlew task video-auth:clean video-auth:bootJar
start "video-user" /wait cmd /c gradlew task video-user:clean video-user:bootJar

REM docker build -t video-discovery:1.0 video-discovery
REM docker build -t video-gateway:1.0 video-gateway
REM docker build -t video-auth:1.0 video-auth
docker build -t video-user:1.0 video-user

docker-compose up -d
